import 'package:flutter/material.dart';

class MyContainer extends StatelessWidget {
  MyContainer({
    required this.child,
    this.color,
    this.borderRadius,
    this.margin,
    this.padding,
    this.gradient,
    this.height,
    this.width,
    this.alignment,
  });

  final Color? color;
  final LinearGradient? gradient;
  final BorderRadius? borderRadius;
  final Widget child;
  final EdgeInsets? margin;
  final EdgeInsets? padding;
  final double? height;
  final double? width;
  final AlignmentGeometry? alignment;

  @override
  Widget build(BuildContext context) {
    return Container(
      alignment: alignment,
      width: width,
      height: height,
      margin: margin ?? EdgeInsets.all(0),
      padding: padding ?? EdgeInsets.all(0),
      decoration: BoxDecoration(
        borderRadius: borderRadius ?? BorderRadius.circular(10),
        //color:color ?? Colors.white,
        gradient: gradient ??
            LinearGradient(
                colors: [color ?? Colors.white, color ?? Colors.white]),
        // boxShadow: [
        //   BoxShadow(
        //       color: Colors.black12,
        //       offset: Offset(1.0, 1.0),
        //       blurRadius: 3.0,
        //       spreadRadius: 2.0)
        // ],
      ),
      child: child,
    );
  }
}
